#include <iostream>

namespace lei {
template <typename T>
class MyAllocator {
 public:
  // 一组typedef
  using value_type = T;
  using pointer = T*;
  using const_pointer = const T*;
  using reference = T&;
  using const_reference = const T&;
  using size_type = std::size_t;
  using difference_type = std::ptrdiff_t;
  // 分配器构造函数
  MyAllocator() noexcept;
  MyAllocator(const MyAllocator& other) noexcept;
  template <typename U>
  MyAllocator(const MyAllocator<U>& other) noexcept;
  // 分配器析构函数
  ~MyAllocator();
  // 分配内存
  pointer allocate(size_type n);
  // 释放内存
  void deallocate(pointer p, size_type n);
  // 构造对象
  void construct(pointer p, const_reference val);
  // 析构对象
  void destroy(pointer p);

 private:
};
}  // namespace lei